package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ReporteIngredientes extends javax.swing.JFrame {
	private JPanel panReporteIngredientes;
	private JScrollPane jScrollPane1;
	private JSeparator jSeparator1;
	private JButton btnSalir;
	private JTable tblReporteIngredientes;
	private JLabel jLabel1;

	public ReporteIngredientes() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(0,0,0));
			{
				panReporteIngredientes = new JPanel();
				getContentPane().add(panReporteIngredientes, BorderLayout.CENTER);
				panReporteIngredientes.setLayout(null);
				panReporteIngredientes.setBackground(new java.awt.Color(0,0,0));
				panReporteIngredientes.setPreferredSize(new java.awt.Dimension(599, 421));
				{
					jLabel1 = new JLabel();
					panReporteIngredientes.add(jLabel1);
					jLabel1.setText("REPORTE DE INGREDIENTES");
					jLabel1.setFont(new java.awt.Font("Purisa",1,14));
					jLabel1.setForeground(new java.awt.Color(255,255,255));
					jLabel1.setBounds(181, -5, 259, 40);
				}
				{
					jScrollPane1 = new JScrollPane();
					panReporteIngredientes.add(jScrollPane1);
					jScrollPane1.setBounds(17, 64, 571, 313);
					{
						tblReporteIngredientes = new JTable();
						jScrollPane1.setViewportView(tblReporteIngredientes);
					}
				}
				{
					btnSalir = new JButton();
					panReporteIngredientes.add(btnSalir);
					btnSalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/salir.jpg")));
					btnSalir.setActionCommand("Salir");
					btnSalir.setOpaque(false);
					btnSalir.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
					btnSalir.setBounds(596, 377, 27, 30);
				}
				{
					jSeparator1 = new JSeparator();
					panReporteIngredientes.add(jSeparator1);
					jSeparator1.setBounds(181, 23, 239, 10);
				}
			}
			pack();
			this.setSize(644, 449);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public void addListener(ActionListener actionListener){
		this.btnSalir.addActionListener(actionListener);
	}
	public void setTablaIngredientes(AbstractTableModel abstracTableModel){
		this.tblReporteIngredientes.setModel(abstracTableModel);
	}
}
